//1.获取合约实例
let contractInstance = require('./instance')
const from = '0xC8147B0093339470dA5aaF4DFF643815c4adA893'
contractInstance.methods.getName().call().then(result =>{
    //1.读取到合约的结果
    console.log("得到的结果:",result)
    //2.设置合约的变量值
    contractInstance.methods.setName("currentJack").send({
        from:from,
        value:0}).then(res =>{
            console.log(res)
        //3.得到新的合约的值
        contractInstance.methods.getName().call().then(res=>{
            console.log("得到修改后的结果", res)
        })
    })
})